<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:if test="${page.totalPages>1}"><!-- 超过一页才有分页条-->
	<div class="panel-footer" style="text-align:right;padding-top:0px;padding-bottom: 0px;background: white;">
		<ul class="pagination" id="pageUl">
			<!--上一页-->
			<c:choose>
				<c:when test="${page.pageNo==1}">
					<li class="disabled">
						<a href="javascript:void(0)" aria-label="Previous">
							<span aria-hidden="true">&laquo;</span>
						</a>
					</li>
				</c:when>

				<c:otherwise>
					<li>
						<input type="hidden" class="pageNo" value="${page.pageNo-1}"/>
						<a href="javascript:void(0)" aria-label="Previous">
							<span aria-hidden="true">&laquo;</span>
						</a>
					</li>
				</c:otherwise>
			</c:choose>

			<!--循环遍历显示开始页-结束页-->
			<c:forEach begin="${page.startpage}" end="${page.endpage}" var="pageNo">

				<c:if test="${pageNo==page.pageNo}">
					<li class="active">
						<input type="hidden" class="pageNo" value="${pageNo}"/>
						<a href="javascript:void(0)">${pageNo}</a>
					</li>
				</c:if>
				<c:if test="${pageNo!=page.pageNo}">
					<li>
						<input type="hidden" class="pageNo" value="${pageNo}"/>
						<a href="javascript:void(0)" target="_self">${pageNo}</a>
					</li>
				</c:if>

			</c:forEach>

			<!--下一页-->
			<c:choose>
				<c:when test="${page.pageNo==page.endpage}">
					<li class="disabled">
						<a href="javascript:void(0)" aria-label="Next">
							<span aria-hidden="true">&raquo;</span>
						</a>
					</li>
				</c:when>

				<c:otherwise>
					<li>
						<input type="hidden" class="pageNo" value="${page.pageNo+1}"/>
						<a href="javascript:void(0)" aria-label="Next">
							<span aria-hidden="true">&raquo;</span>
						</a>
					</li>
				</c:otherwise>
			</c:choose>

		</ul>
	</div>
</c:if>
<script>
    //分页点击效果
    $("#pageUl li").click(function(){
        var pageNo=$(this).find(".pageNo").val();
        if(pageNo!=""&&pageNo!=null&&pageNo!=undefined){
            creatPageList(pageNo);
		}

    });

</script>